﻿#region 命名空间

using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Microsoft.Practices.EnterpriseLibrary.PolicyInjection;
using WinnerCMS.Model;

#endregion

namespace WinnerCMS.BLL.PageFactory
{
    /// <summary>
    /// 新评论
    /// </summary>
    [ToolboxData("<{0}:NewComments runat=\"server\"></{0}:NewComments>")]
    public class NewComments : DataBox
    {
        private static readonly CommentManage Bll = PolicyInjection.Create<CommentManage>();
        public int ContentID { get; set; }
        public int Rows { get; set; }

        protected override void OnLoad(EventArgs e)
        {
            DataSource = Bll.CommentShow(Rows, ContentID);
            DataBind();
        }
    }
}